<?php

namespace app\admin\model;

use think\Model;


class Adv extends Model
{


    // 表名
    protected $name = 'adv';

    // 自动写入时间戳字段
    protected $autoWriteTimestamp = true;
    protected $type = ['create_time'=>'datetime:Y-m-d H:i:s','update_time'=>'datetime:Y-m-d H:i:s'];

    // 定义时间戳字段名
    protected $updateTime = false;
    protected $deleteTime = false;
    protected $resultSetType = 'collection';

    // 追加属性
    protected $append = [

    ];

    //图片
    public function getImageAttr($value, $data)
    {

            return cdnurl( $data['image']);


    }

    public function getAvatarImageAttr($value, $data)
    {

            return cdnurl( $data['avatar_image']);


    }

}
